# reportWord
# 2024/10/21
# author:www
from common.baseApi import BaseApi
from configs.config import login_request
from libs.login import Login
from utils.handle_path import data_path


class HealthRecord(BaseApi):
    pass

if __name__ == '__main__':
    # 先登录获取token,返回了token,uaaid
    login_r = Login().login(login_request, Token=True)
    r = HealthRecord(login_r)
    reportword_list_request = {"current":1,"pageSize":15,"condition":{"resultWord":""}}
    resu = r.getPage(reportword_list_request)
    print(resu)
    reportword_update_request = {"id":"5873653c4aee859bc752d1c314758d4c","resultWord":"症状：其他111","abbr":"","reason":"",
                                 "suggest":"症状：其他症状：其他","createdUserId":"3873eb340b2d3bf9396b45ed0d5c06fa",
                                 "createdTime":"2024-10-10 11:58:06","updatedUserId":"3873eb340b2d3bf9396b45ed0d5c06fa",
                                 "updatedTime":"2024-10-10 11:58:06","disableUpdateInfo":None,"orgId":"440282_040","createdUserIdVal":"南雄乌迳机构管理员","updatedUserIdVal":"南雄乌迳机构管理员"}
    reportword_update_response = r.saveOrUpdate(reportword_update_request)
    print(reportword_update_response)
    # print(f'{data_path}\\imageupload.png')  #  D:\py_project\Health_SaaS_Interface\data\imageupload.png
    # reportre = r.upload(f'{data_path}\\imageupload.png')  # (data_path+r'\imageupload.png')
    # print(reportre)